package com.cesc.springcloud;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient("webflux-service-provider")
public interface ProductService {

    @RequestMapping(value = "/product",method = RequestMethod.GET)
    List<Product> getProducts();

    @RequestMapping(value = "/product//db/save",method = RequestMethod.POST)
    Product saveProductToDb(@RequestBody Product product);


}
